﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.Model
@using ZoomLa.BLL
@model ZoomLa.SQLDAL.SQL.PageSetting
@{
    Model.cols = 7;
}
@functions{
    public string GetAdminName(int id)
    {
        M_AdminInfo madmininfo = B_Admin.GetAdminByAdminId(id);
        if (madmininfo != null && madmininfo.AdminId > 0)
        {
            return madmininfo.UserName;
        }
        else
        {
            return "";
        }
    }
}
<table id="EGV" class="table table-striped table-bordered table-hover">
    <tr><td class="td_s"></td><td class="td_s">ID</td><td>考点名称</td><td>管理员</td><td>排序</td><td>添加时间</td><td>操作</td></tr>
    @if (Model.itemCount > 0)
    {
        foreach (DataRow dr in Model.dt.Rows)
        {
            <tr ondblclick="location.href = 'AddExamPoint?id=@dr["ID"]';">
                <td><input name="idchk" type="checkbox" value='@dr["ID"]' /></td>
                <td>@dr["ID"]</td>
                <td>@dr["TestPoint"]</td>
                <td>@GetAdminName(DataConverter.CLng(dr["AddUser"]))</td>
                <td>@dr["OrderBy"]</td>
                <td>@DataConverter.CDate(dr["AddTime"]).ToString("yyyy-MM-dd HH:mm")</td>
                <td>
                    <a href="AddExamPoint?id=@dr["ID"]" class="option_style"><i class="fa fa-pencil" title="修改"></i></a>
                    <a href="javascript:;" onclick="mvcpage.del({ url: 'ExamPoint_Del', ids: @dr["ID"] });" class="option_style"><i class="fa fa-trash-o" title="删除"></i>删除</a>
                </td>
            </tr>
        }
    }
    else
    {
        <tr><td colspan="5">当前没有数据</td></tr>
    }
    @Html.Partial("_page", Model)
</table>